package pers.whj.rpc.common;

import pers.whj.rpc.protocol.Address;

public class Config {
    public static final boolean DEBUG = true;
    public static final int TIME_OUT_CONNECT = 1000;
    public static final int TIME_OUT_CLIENT_READ = 3000;
    public static final int TIME_OUT_NO_REQ = 60 * 1000;
    /**
     * 支持at-least-once语义，client未收到回复超过三次，提示错误
     */
    public static final int CLIENT_REPEAT_COUNT = 3;
    /**
     * 一次最大读取数据量
     */
    public static final int MAX_LENGTH_ONCE = 1024;
    /**
     * data长度小于等于给定值时，断开连接
     */
    public static final int DATA_LENGTH_LIMIT_TO_END = 0;

    /**
     * 一次最大可传输的数据大小
     */
    public static final int MAX_TRANSPORT_BYTE = 1024 * 1024;

    public static final Address SERVER_ADDRESS = new Address("127.0.0.1", 3000);
}
